/*************************************************
 * 
 * Copyright by Bruno Eberhard
 * 
 * Created on 30.07.2005
 *
 *************************************************/
package fightplan.views;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import com.jgoodies.binding.value.ValueModel;
import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.layout.FormLayout;

import fightplan.views.tables.FighterTable;

@SuppressWarnings("serial")
public class RegisterPanel extends JPanel {

	public RegisterPanel(ValueModel tournamentModel) {
		setLayout(new BorderLayout());

		FormLayout layout = new FormLayout("left:max(40dlu;p), 4dlu, pref:grow(1), 7dlu, ", // 1st
																							// major
																							// column
				// + "left:max(40dlu;p), 4dlu, pref:grow:fill, 1dlu, 20dlu", //
				// 2nd major column
				"20dlu, 100px:grow:fill");

		DefaultFormBuilder builder = new DefaultFormBuilder(layout);

		builder.setDefaultDialogBorder();
		builder.appendSeparator("Einschreibungen");
		builder.nextLine();

		builder.append(new FighterTable(tournamentModel), 3);
		builder.nextLine();

		add(builder.getPanel(), BorderLayout.CENTER);
	}

}
